import { Component, EventEmitter, Input, Output } from '@angular/core';
import { FormDefaultComponent } from './FormDefault.component';

@Component({
    selector: 'app-form-input-number',
    templateUrl: './FormInputNumber.component.html',
})
export class FormInputNumberComponent extends FormDefaultComponent {
    @Input() min: number;
    @Input() max: number;
    @Input() showPercent = false;
    @Output() inputHandler = new EventEmitter();
    @Output() changeHandler = new EventEmitter();

    constructor() {
        super();
    }

    inputUpdate() {
        this.inputHandler.emit();
    }

    changeUpate() {
        this.changeHandler.emit();
    }
}
